package main

import (
	"fmt"
	"reflect"
	"strconv"
)

func main() {
	if num1, err := strconv.Atoi("123"); err != nil {
		fmt.Println("转换int失败")
	} else {
		fmt.Println(num1)
	}

	fmt.Println("string:", strconv.Itoa(1234))

	if bool1, err := strconv.ParseBool("false"); err != nil {
		fmt.Println("转换bool失败")
	} else {
		fmt.Println(reflect.TypeOf(bool1).Kind(), bool1)
	}

	fmt.Println(strconv.FormatInt(123, 16))
}
